package com.example.design.factory.version6.homework;

public class BookTest {
    public static void main(String[] args) {
        Book book1=new Book(1,11,"西游记",20.5);
        Book book2=new Book(2,22,"三国演义",33.6);
        Book book3=new Book(3,33,"红楼梦",45.7);
        Book book4=new Book(4,44,"水浒传",57.8);
        Book book5=new Book(5,55,"弟子规",78.3);

        ArrayBookBiz arr=new ArrayBookBiz();

        //添加图书
        arr.add(book1);
        arr.add(book2);
        arr.add(book3);
        arr.add(book4);
        arr.add(book5);


        //输出图书信息
        arr.outputAllBooks();

        System.out.println("=====================");
        //删除指定书名的书
        arr.deleteByName("西游记");
        //输出删除后的图书信息
        arr.outputAllBooks();

        System.out.println("==========");
        arr.add(book1);
        arr.outputAllBooks();


    }
}
